﻿using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System.Collections;

public class StartGameButton : MonoBehaviour {

	public MainController controller;

	void Start(){

		Button btn = GetComponent<Button> ();
		btn.onClick.AddListener (delegate() {
			this.OnClick();
		});

	}

	public void OnClick() {

		controller.FadeOutSence ( () => {
			// 进入 MainGame Sence
			Application.LoadLevel("MainGame");		
		});

	}
}
